﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ArduinoDashboard.Dashboard
{
	public partial class frmMain: Form
    {
        public frmMain()
        {
            InitializeComponent();

            transparentControl1.Location = new Point(pictureBox2.Location.X, pictureBox2.Location.Y);
            transparentControl1.Size = new Size(pictureBox2.Size.Width, pictureBox2.Size.Height);
        }

        private void groupBox_VisibleChanged(object sender, EventArgs e)
        {
            var orderList = new List<Control>();
            orderList.Add(panelNoSensors);
            orderList.Add(groupBoxSensorDistance);
            orderList.Add(groupBoxOrientationSensor);
            orderList.Add(groupBoxMFSensor);

            for (int i = 0; i < orderList.Count; i++)
                orderList[i].BringToFront();
        }

	}
}
